<!--TODO 暂时没有数据-->
<% include ../header.ejs %>

<link rel="stylesheet" href="/stylesheets/app/recommend/recommed.css">
<!--<script src="/lib/alert/amuiAlert.js"></script>-->
<style>
    .icon-red{
        color: red;
    }
    .icon-green{
        color: green;
    }
    .icon-darkgrey{
        color: darkgrey;
    }
</style>
<header data-am-widget="header" data-am-sticky class="am-header am-header-default" id="appTemplates-Nav">
    <div class="am-header-left am-header-nav">
        <a href="<%= (typeof(page) != 'undefined' && page=='search')?'javascript:history.go(-1);':'/smtool_project/wxapp/morningconference/index'%>" class="">
            <img class="am-header-icon-custom" src="data:image/svg+xml;charset&#x3D;utf-8,&lt;svg xmlns&#x3D;&quot;http://www.w3.org/2000/svg&quot; viewBox&#x3D;&quot;0 0 12 20&quot;&gt;&lt;path d&#x3D;&quot;M10,0l2,2l-8,8l8,8l-2,2L0,10L10,0z&quot; fill&#x3D;&quot;%23fff&quot;/&gt;&lt;/svg&gt;" alt=""/>
        </a>
    </div>

    <h1 class="am-header-title">
        <a href="#title-link" class="" id="Typeface-whitecolor">晨会明细</a>
    </h1>
    <!--<div class="am-header-right am-header-nav">-->
        <!--<a href="#right-link" class="">-->
            <!--<i class="am-header-icon am-icon-bars"></i>-->
            <!--<ul class="am-dropdown-content">-->
                <!--<li><a href="#">注册</a></li>-->
                <!--<li><a href="#">测试</a></li>-->
            <!--</ul>-->
        <!--</a>-->
    <!--</div>-->

</header>


<form class="am-form" style="margin: 2%; overflow: hidden;">
    <div class="am-list-item-hd am-g am-div-margin" style="margin-top: 1rem">
        <div class="am-u-sm-3">
            <p class="am-list-item-hd">日期</p>
        </div>
        <div class="am-u-sm-9 am-fr">
            <p class="am-list-item-hd"><%= mConference.date%></p>
        </div>
    </div>

    <!--<div class="am-list-item-hd am-g am-div-margin">
        <div class="am-u-sm-3">
            <p class="am-list-item-hd">所属公司</p>
        </div>
        <div class="am-u-sm-9 am-fr">
            <p class="am-list-item-hd"><%= mConference.seller.name%></p>
        </div>
    </div>-->

    <div class="am-list-item-hd am-g am-div-margin">
        <div class="am-u-sm-3">
            <p class="am-list-item-hd">行业</p>
        </div>
        <div class="am-u-sm-9 am-fr">
            <p class="am-list-item-hd"><%= mConference.industry.industryName%></p>
        </div>
    </div>

    <div class="am-list-item-hd am-g am-div-margin">
        <div class="am-u-sm-3">
            <p class="am-list-item-hd">发言人</p>
        </div>
        <div class="am-u-sm-9 am-fr">
            <p class="am-list-item-hd"><%= mConference.analyst.name%></p>
        </div>
    </div>

    <div class="am-list-item-hd am-g am-div-margin">
        <div class="am-u-sm-3">
            <p class="am-list-item-hd">类型</p>
        </div>
        <div class="am-u-sm-9 am-fr">
            <p class="am-list-item-hd"><%= mConference.type%></p>
        </div>
    </div>
    <div class="am-list-item-hd am-g am-div-margin">
        <div class="am-u-sm-3">
            <p class="am-list-item-hd">盘面指数</p>
        </div>
        <div class="am-u-sm-9 am-fr">
            <p class="am-list-item-hd"><%= mConference.quotation%></p>
        </div>
    </div>
    <%if(mConference.companyRecommend!=0){%>
    <div class="am-list-item-hd am-g am-div-margin">
        <div class="am-u-sm-3">
            <p class="am-list-item-hd">涉及股票</p>
        </div>
        <div class="am-u-sm-9 am-fr">
            <p class="am-list-item-hd">
                    <% mConference.companyRecommend.forEach(function(data, key){ %> <%= data.stockId.stockCode%>-<%= data.stockId.name%>
                <span class = ""><%= data.trade%></span><br> <% })%>
            </p>
        </div>
    </div>
    <%}%>

    <div class="am-list-item-hd am-g am-div-margin">
        <div class="am-u-sm-3">
            <p class="am-list-item-hd">核心观点</p>
        </div>
        <div class="am-u-sm-9 am-fr">
            <p class="am-list-item-hd"><%= mConference.corePoint%></p>
        </div>
    </div>

    <div class="am-list-item-hd am-g am-div-margin">
        <div class="am-u-sm-3">
            <p class="am-list-item-hd">联系方式</p>
        </div>
        <div class="am-u-sm-9 am-fr">
            <p class="am-list-item-hd"><%= mConference.contact%></p>
        </div>
    </div>

   <!-- <div class="am-list-item-hd am-g am-div-margin">
        <div class="am-u-sm-3">
            <p class="am-list-item-hd">时间偏好</p>
        </div>
        <div class="am-u-sm-9 am-fr">
            <p class="am-list-item-hd"><%= mConference.timePlan%></p>
        </div>
    </div>-->

    <div id="divAction">
        <%if(mConference.createUid.rowId == userinfo.rowId){%>
        <button class="am-btn am-btn-success  am-radius am-u-sm-5" type="button" onclick="edit()">编辑</button>
        <div class="am-u-sm-2"></div>
        <button class="am-btn am-btn-danger  am-radius am-u-sm-5" type="button" onclick="del()">删除</button>
        <%}%>
    </div>

</form>
<!--评论删除-->
<div class="am-modal am-modal-confirm" tabindex="-1" id="my-comment-confirm">
    <div class="am-modal-dialog">
        <div class="am-modal-bd" id="my-confirm-text">
            是否确定删除
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-cancel>取消</span>
            <span class="am-modal-btn" data-am-modal-confirm>确定</span>
        </div>
    </div>
</div>

<!--评论按钮-->
<div class="amz-toolbar" id="amz-toolbar" style="right: 27.5px;">
    <a href="#" class="am-icon-btn am-secondary am-icon-commenting-o" id="doc-prompt-toggle" onClick = "openComment('<%=mConference.rowId%>','/smtool_project/wxapp/morningconference/addComment','<%=userinfo.extension%>','morning')"></a>
</div>
<!--评论输入-->
<div class="am-modal am-modal-prompt" tabindex="-1" id="my-prompt">
    <div class="am-modal-dialog" style="width:90%;height: 22rem;">
        <div class="am-modal-hd">发表点评</div>
        <div class="am-modal-bd" style="width:100%;height: 12rem;">
            <textarea name="a" style="width:100%;height: 100%;" class="am-modal-prompt-input" id="commentContext"></textarea>
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-cancel>取消</span>
            <span class="am-modal-btn" data-am-modal-confirm id>发表</span>
        </div>
    </div>
</div>
<!--评论信息-->
<div data-tab-panel-1 class="am-panel-default">
    <div>
        <ul class="am-comments-list am-comments-list-flip">
            <%commentList.forEach(function(data, key){ %>
            <li class="am-comment" id="<%=data.rowId%>">
                <article class="am-comment">
                    <a href="#link-to-user-home">
                        <img src="<%=data.createUid.extension%>" alt="" class="am-comment-avatar" width="48" height="48"/>
                    </a>

                    <div class="am-comment-main">
                        <header class="am-comment-hd">
                            <div class="am-comment-meta">
                                <a href="#link-to-user" class="am-comment-author"><%=data.name%></a>
                                点评于 <time datetime="" title=""><%=dateFormat(data.createdAt);%></time>
                            </div>
                            <div class="am-comment-actions" style="font-size:18px">
                                <!--<a href="#" onClick = "editComment('<%=data.rowId%>')" class="am-margin-horizontal-sm">-->
                                    <!--<i class="am-icon-pencil"></i>-->
                                <!--</a>-->
                                <% if(userinfo.rowId == (data.createUid&&data.createUid.rowId)){ %>
                                    <a href="#" onClick = "delComment('<%=data.rowId%>')"><i class="am-icon-close"></i></a></div>
                                <%}%>
                        </header>

                        <div class="am-comment-bd" >
                            <%=data.context%>
                        </div>

                    </div>

                </article>
            </li>
            <%})%>
        </ul>
    </div>
</div>
<!--评论信息结束-->
<!--删除confirm-->
    </div>
<div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm">
    <div class="am-modal-dialog">
        <div class="am-modal-bd">
            您确定要删除这条记录吗？
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-cancel>取消</span>
            <span class="am-modal-btn" data-am-modal-confirm>确定</span>
        </div>
    </div>
</div>
<script src="/javascripts/app/comment/comment.js"></script>
<script>
    var rowId = '<%=mConference.rowId%>';

    function del(){
        $('#my-confirm').modal({
            relatedTarget: this,
            onConfirm: function (options) {
                $.post("/smtool_project/wxapp/morningconference/delMConference",{rowId:rowId},
                        function (data, status) {
                            if(data.code == 200)
                                location.href = "/smtool_project/wxapp/morningconference/index";
                        });
            },
            // closeOnConfirm: false,
            onCancel: function () {
            }
        });
    };
    function edit(){
        location.href = "/smtool_project/wxapp/morningconference/add?page=edit&rowId="+rowId;
    }
</script>
<% include ../footer.ejs %>